public class HomeWork03{
	public static void main(String[] args) {
		int[] num={20,-1,89,2,890,7};
		
		int len=num.length-1;
		for(int i = 0; i < num.length-1; i++){
			int currentIndex=0;
			boolean flag = false;
			for(int j = 0; j < len; j++){
				if(num[j] > num[j+1]){
					int temp = num[j];
					num[j] = num[j+1];
					num[j+1] = temp;
					currentIndex = j;
					flag = true;
				}
			}
			len=currentIndex;
			if(!flag){
				break;
			}
		}
		for (int i = 0; i < num.length; i++ ) {
			System.out.println(num[i]+"\t");
		}
	}
}